A Device-to-Device (D2D) communications technology has been relatively widely applied to the public security field (for example, earthquake relief) and the commercial field (for example, a discount information broadcast in a shopping mall, and personal ticket transfer). After D2D communication starts between user devices, information can be exchanged directly without requiring support of a network device, which reduces network load and improves user experience.
In a type of network-controlled D2D, although a user device does not require support of a network device in a communication process, resources used by the user device during communication, including time, a frequency, a code word, and a spatial signal, still need to be allocated and controlled by the network device. In this mode, reliability, quality, and user experience of communication are more assured. Therefore, this technology also receives more attention from a communications standardization organization, operators, and equipment vendors.
In the prior art, when a network device allocates a resource to a group of user devices that need to perform D2D communication, the network device separately allocates, by using signaling, a different resource identifier to each user device in the D2D communication. For each resource identifier, the network device allocates a corresponding D2D resource for the resource identifier by using a separate resource allocation message. However, in a resource allocation process, signaling resource overheads are high, and resource allocation efficiency is low.